<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<form id="pagerForm" method="post" action="devicemanage">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="<s:property value="pm.numPerPage"/>" />
	<input type="hidden" name="assetname" value="<s:property value="assetname"/>" />
</form>

<script type="text/javascript">
function prepareDownLoadExcel(){
	//提交form
	document.deviceForm.action="prepareDownLoadExcel";
	//document.deviceForm.onsubmit="";
	document.deviceForm.submit();
	//return false;
}
function queryItems(){
	//提交form
	document.deviceForm.action="SearchDevice_List";
//	return navTabSearch(obj);
	//document.deviceForm.submit();
	//return false;
}
</script>

<form  name="deviceForm" id="formId"  onsubmit="return navTabSearch(this);" action="SearchDevice_List" method="post">
<div class="pageHeader">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td align="left">
					设备编号:<s:textfield theme="simple" name="searchDeviceId" ></s:textfield>
				</td>
				<td align="left">
					资产标号:<s:textfield theme="simple" name="searchAssetNumber" ></s:textfield>
				</td>
				<td align="left">
					设备类型:<s:textfield theme="simple" name="searchDeviceType" ></s:textfield>
				</td>
				<td align="left">
					所属实验室:<s:textfield theme="simple" name="searchRoomId" ></s:textfield>
				</td>
				
				<td>
				<div class="buttonActive"><div class="buttonContent"><button type="submit"  onclick="queryItems();">检索</button></div></div>
				</td>
			</tr>
		</table>
	</div>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="Device_Add" target="navTab" rel="Device_Add"><span>新增</span></a></li>
			<li><a class="edit" id="Device_Modify" href="Device_Modify?device_id={device_id}" target="navTab" rel="Device_Modify"><span>修改</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="Device_BatchDelete" class="delete"><span>删除</span></a></li>
			<li><a class="icon" href="BatchImport" width="560" height="300"  target="dialog" rel="BatchImport"><span>导入excel</span></a></li>	
	 		<li><a class="icon"  rel="ids" onclick="prepareDownLoadExcel();" ><span>导出excel</span></a></li>
		</ul>
	</div>
		
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th align="center"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th align="center">设备编号</th>
				<th align="center">设备名称</th>
				<th align="center">资产标号</th>
				<th align="center">设备类型</th>
				<th align="center">购置日期</th>
				<th align="center">所属实验室</th>
				<th align="center">单价</th>
				<th align="center">数量</th>
				<th align="center">计量单位</th>
				<th align="center">型号规格</th>
				<th align="center">生产厂家</th>
				<th align="center">设备状态</th>
				<th align="center">录入日期</th>
				<th align="center">操作人员</th>
				<th align="center">备注</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="pm.list" status="index"  var="cp">
				<tr target="device_id" rel="<s:property value="deviceid"/>" modifyTagId="Device_Modify"> 
					<td align="center"><input name="ids" value="<s:property value="deviceid"/>" type="checkbox"></td>
					<td align="center"><s:property value="deviceid"/></td>
					<td align="center"><s:property value="assetname"/></td>
					<td align="center"><s:property value="assetnumber"/></td>
					<td align="center"><s:property value="devicetype"/></td>
					<td align="center"><s:property value="buydate"/></td>
					<td align="center"><s:property value="belongroom"/></td>
					<td align="center"><s:property value="price"/></td>
					<td align="center"><s:property value="count"/></td>
					<td align="center"><s:property value="measurunit"/></td>
					<td align="center"><s:property value="model"/></td>
					<td align="center"><s:property value="manufacturer"/></td>
					<td align="center"><s:property value="devstate"/></td>
					<td align="center"><s:property value="enterdate"/></td>
					<td align="center"><s:property value="operator"/></td>  
					<td align="center"><s:property value="note"/></td>
				</tr>
			</s:iterator>	
		</tbody>
	</table>
	
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option <s:if test='%{numPerPage=="20"}'>selected="selected"</s:if> value="20">20</option>
				<option <s:if test='%{numPerPage=="50"}'>selected="selected"</s:if> value="50">50</option>
				<option <s:if test='%{numPerPage=="100"}'>selected="selected"</s:if> value="100">100</option>
				<option <s:if test='%{numPerPage=="200"}'>selected="selected"</s:if> value="200">200</option>
			</select>
			<span>条，共${pm.totalCount}条</span>
		</div>
		
		<!--分页组件-->  
		<div class="pagination" targetType="navTab" totalCount="${pm.totalCount}" numPerPage="${pm.numPerPage}" pageNumShown="10" currentPage="${pm.pageNum}"></div>
	</div>
</div>
</form>
